package com.psbc.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.sun.xml.internal.ws.developer.Serialization;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student {
    @TableId(type = IdType.AUTO)
    private int id;
    private String name;
    //逻辑删除，然后还需要配置类，在properties中进行配置
    @TableLogic
    private int deleted;
    @Version  //乐观锁version注解
    private int version;
    //字段属性，可以进行自动填充的配置，但是需要写一个配置类
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
